package com.gyg.controller;

import com.gyg.returns.RespEntity;
import com.gyg.service.CloudVisitService;
import com.gyg.vo.result.VisitResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 云盘访问量表 前端控制器
 * </p>
 *
 * @author gyg
 * @since 2021-04-14
 */
@RestController
@RequestMapping("/cloud-visit")
@Api(value = "访问量模块", tags = "访问量模块")
@Slf4j
public class CloudVisitController {

    @Resource
    private CloudVisitService cloudVisitService;

    @GetMapping("/pv")
    @ApiOperation(value = "日访问量统计")
    public RespEntity<VisitResult> hour() {
        RespEntity<VisitResult> respEntity = cloudVisitService.visitList();
        return respEntity;
    }


}
